home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK2.toast / Development Kits (Disc 2) / QuickTime™ VR 2.0 SDK / QTVR C⁄C++ Runtime API / Sample Code / VRShell Sample Code / VR3DObjects / Application Files / MacApplication.h < prev    next >
Encoding:
Text File  |  1997-05-22  |  2.5 KB  |  87 lines  |  [TEXT/MPCC]

  1. //
  2. //    File:        MacApplication.h
  3. //
  4. //    Contains:    Functions that could be overridden in a specific application.
  5. //
  6. //    Written by:    Tim Monroe
  7. //                Based on the MovieShell code written by Apple DTS
  8. //                Parts modeled on BoxMoov code by Nick Thompson, Rick Evans, and Robert Dierkes
  9. //                and on code in QD3D book (by yours truly!)
  10. //
  11. //    Copyright:    © 1994-1996 by Apple Computer, Inc., all rights reserved.
  12. //
  13. //    Change History (most recent first):
  14. //
  15. //       <3>         12/13/96    rtm        added application-specific data structure
  16. //       <2>         11/27/96    rtm        conversion to personal coding style
  17. //       <1>         12/21/94    khs        first file
  18. //       
  19. //
  20.  
  21. #pragma once
  22. #include "QD3D.h"
  23. #include "Texture.h"
  24.  
  25. // application-specific constants
  26. // for menus
  27.  
  28. enum eAppMenus {
  29.     mTesting = 131,
  30.     mObjects = 132
  31. };
  32.  
  33. enum eTestingMenu {
  34.     iTest1 = 1,
  35.     iTest2,
  36.     iTest3,
  37.     iTest4,
  38.     iTest5,
  39.     iTest6,
  40.     iTest7,
  41.     iTest8,
  42.     iTest9,
  43.     iTest10
  44. };
  45.  
  46. enum eObjectsMenu {
  47.     iBox = 1,
  48.     iCone,
  49.     iCylinder,
  50.     iEllipsoid,
  51.     iTorus,
  52.     iPolyhedron,
  53.     i3DMFFile
  54. };
  55.  
  56.  
  57. //////////
  58. // structures
  59. //////////
  60.  
  61. // application-specific window data
  62.  
  63. typedef struct {
  64.     WindowPtr            fWindow;            // the window associated with this document
  65.     TQ3ViewObject        fView;                // the view for the scene
  66.     TQ3GroupObject        fModel;                // the 3D object in the scene being modelled
  67.     TQ3StyleObject        fInterpolation;        // interpolation style used when rendering
  68.     TQ3StyleObject        fBackFacing;        // whether to draw shapes that face away from the camera
  69.     TQ3StyleObject        fFillStyle;            // whether drawn as solid filled object or decomposed to components
  70.     TQ3Matrix4x4        fRotation;            // the transform for the model
  71.     TQ3Point3D            fGroupCenter;        // the center of the group (for rotation) 
  72.     float                fGroupScale;        // scaling factor to apply before drawing
  73.     TextureHdl            fTexture;            // the texture for the 3D object
  74.     GWorldPtr            fGWorld;            // the offscreen graphics world used for the pixmap draw context
  75.     Boolean                fTextureIsMovie;    // is the texture from a QuickTime movie?
  76.     Boolean                fObjectIsAnimated;    // is the 3D object being animated?
  77.     Boolean                fCameraChanged;        // does the 3D camera need to be updated?
  78.     Boolean                fMustRender;        // does the 3D overlay need to be rendered?
  79.     Boolean                fQTMovieHasSound;    // does the embedded QuickTime movie have a sound track?
  80.     Boolean                fQD3DFOVIsVert;        // is the QD3D camera FOV vertical?
  81.     short                fObjectIndex;        // index of the current predefined 3D object
  82. } ApplicationDataRecord, *ApplicationDataPtr, **ApplicationDataHdl;
  83.  
  84.  
  85. // the function prototypes are in the file MacFramework.h
  86.  
  87.